import { message } from "ant-design-vue";
// 成功
const successMessage = (messageStr) => {
  return message.success({
    content: () => messageStr,
    class: "message-class--success",
  });
};
// 普通提示
const infoMessage = (messageStr) => {
  return message.info({
    content: () => messageStr,
    class: "message-class--info",
  });
};

// 警告
const warnMessage = (messageStr) => {
  return message.warning({
    content: () => messageStr,
    class: "message-class--warning",
  });
};

// 失败
const errorMessage = (messageStr) => {
  return message.error({
    content: () => messageStr,
    class: "message-class--error",
  });
};
export { successMessage, warnMessage, errorMessage, infoMessage };
